package com.cskaoyan.service;

import com.cskaoyan.bean.PO.MarketFeedback;
import com.cskaoyan.bean.PO.MarketUser;
import com.cskaoyan.mapper.MarketFeedbackMapper;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author linhanxin
 * @date 2022/8/18.
 */
@Service
public class WxFeedbackServiceImpl implements WxFeedbackService {
    @Autowired
    MarketFeedbackMapper marketFeedbackMapper;

    @Override
    public Integer feedbackSubmit(MarketFeedback marketFeedback,Integer userId,String username) {
        marketFeedback.setUserId(userId);
        marketFeedback.setUsername(username);
        marketFeedback.setAddTime(new Date());
        marketFeedback.setUpdateTime(new Date());
        marketFeedback.setDeleted(false);
        int affectRows = marketFeedbackMapper.insertSelective(marketFeedback);
        return affectRows;
    }
}
